package com.lxy.order.server.impl;

import com.alibaba.fastjson.JSONObject;
import com.lxy.order.server.MonitorServer;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @Author lxy
 * @Date 2021/12/12 20:47
 * @Description
 */

@Service
public class MonitorDirectType implements MonitorServer {
    @RabbitListener(queues = "DirectQueue")
    public void process(String testMessage) {
        JSONObject json = JSONObject.parseObject(testMessage);
        Map<String, Object> json1 = json;
        System.out.println("订单服务8534收到订单: " + json1.toString());
    }
}
